package Dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import Bean.MemberBean;
import Bean.MusicBean;
import Bean.SingerBean;
import Bean.areaGGLBean;
import Bean.areaGSLBean;
import Bean.arealikeBean;
import Bean.monthGLBean;
import Bean.musicALBean;
import Bean.musicGLBean;
import Bean.singerALBean;

public class adminDao extends SqlMapClientDaoSupport {

	public void deleteArealikeAll() {
		getSqlMapClientTemplate().delete("deleteArealikeAll");
	}

	public void deleteAreaGGLAll() {
		getSqlMapClientTemplate().delete("deleteAreaGGLAll");
	}

	public void deleteAreaGSLAll() {
		getSqlMapClientTemplate().delete("deleteAreaGSLAll");
	}

	public void deleteMusicALAll() {
		getSqlMapClientTemplate().delete("deleteMusicALAll");
	}

	public void deleteMusicGLAll() {
		getSqlMapClientTemplate().delete("deleteMusicGLAll");
	}

	public void deleteSingerALAll() {
		getSqlMapClientTemplate().delete("deleteSingerALAll");
	}

	public void deleteMonthGLAll() {
		getSqlMapClientTemplate().delete("deleteMonthGLAll");
	}

	public void insertAreaGGL(areaGGLBean bean) {
		getSqlMapClientTemplate().insert("insertAreaGGL", bean);
	}

	public void insertAreaGSL(areaGSLBean bean) {
		getSqlMapClientTemplate().insert("insertAreaGSL", bean);
	}

	public void insertArealike(arealikeBean bean) {
		getSqlMapClientTemplate().insert("insertArealike", bean);
	}

	public void insertMusicGL(musicGLBean bean) {
		getSqlMapClientTemplate().insert("insertMusicGL", bean);
	}

	public void insertMusicAL(musicALBean bean) {
		getSqlMapClientTemplate().insert("insertMusicAL", bean);
	}

	public void insertSingerAL(singerALBean bean) {
		getSqlMapClientTemplate().insert("insertSingerAL", bean);
	}

	public void insertMonthGL(monthGLBean bean) {
		getSqlMapClientTemplate().insert("insertMonthGL", bean);
	}

	// --------- 가수 이름 찾기 -------------------------------------------
	public List<SingerBean> searchSingerName(String singer) {
		return (List<SingerBean>) getSqlMapClientTemplate().queryForList(
				"searchSingerName", singer);
	}

	// ---------- 등록된 가수 찾기 ----------------------------------------
	public SingerBean searchSinger(String singer) {
		return (SingerBean) getSqlMapClientTemplate().queryForObject(
				"searchSinger", singer);
	}

	// ---------- 가수 등록 -----------------------------------------------
	public void insertSinger(SingerBean bean) {
		getSqlMapClientTemplate().insert("insertSinger", bean);
	}

	// ---------- 음악 등록 -----------------------------------------------
	public void insertMusic(MusicBean bean) {
		getSqlMapClientTemplate().insert("insertMusic", bean);
	}

	// ---------- 회원의 주민번호 찾기 ----------------------------------------
	public MemberBean ssnSearch(String m_id) {
		return (MemberBean) getSqlMapClientTemplate().queryForObject(
				"hadoopID", m_id);
	}

	// ---------- 장르 번호 검색 --------------------------------------------
	public String genreNo(String genre) {
		return (String) getSqlMapClientTemplate().queryForObject("genreNo",
				genre);
	}

	// ---------- 장르 번호 검색 --------------------------------------------
	public String koreaarea(String area) {
		return (String) getSqlMapClientTemplate().queryForObject("koreaarea",
				area);
	}

	// ---------- 카운터 증가 --------------------------------------------
	public void countUp(String ms_no) {
		getSqlMapClientTemplate().update("countUp", ms_no);
	}
}
